﻿<%@ WebService Language="C#" Class="Venda" %>

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Collections.Generic;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
// [System.Web.Script.Services.ScriptService]
public class Venda : System.Web.Services.WebService 
{
    public Venda()
    {
    }

    [WebMethod]
    public SOA.MODEL.NotaFiscal Vender(SOA.MODEL.Venda venda)
    {
        return new SOA.DAL.Venda().Salvar(venda);
    }
    
    [WebMethod]
    public SOA.MODEL.VendaDiaria TotalizarVendasDiaria(int idFilial)
    {
        return new SOA.DAL.Venda().TotalizarVendaDiariaPorFilial(idFilial, Convert.ToDateTime("01/05/2014"));
    }
}
